package cn.exrick.xboot.securityAdvisor.controllerImpl

import cn.exrick.xboot.base.dto.BreakRolesRecordDto
import cn.exrick.xboot.base.entity.HiddenDangerRecord
import cn.exrick.xboot.base.service.IHiddenDangerRecordService
import cn.exrick.xboot.base.vo.HiddenDangerRecordDetailVo
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import cn.exrick.xboot.securityAdvisor.controller.ISecurityAdvisorController
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RestController

@RestController
open class HiddenDangerRecordController : ISecurityAdvisorController.IHiddenDangerRecord{

    @Autowired
    private lateinit var iHiddenDangerRecordService: IHiddenDangerRecordService


    override fun createOrUpdateHiddenDangerRecord(hiddenDangerRecord: HiddenDangerRecord): Result<Any?>? {

        return iHiddenDangerRecordService.createOrUpdateHiddenDangerRecord(hiddenDangerRecord)
    }

    override fun removeHiddenDangerRecord(ids: Array<out String>): Result<Any?>? {

        return iHiddenDangerRecordService.removeHiddenDangerRecord(ids)
    }

    override fun getHiddenDangerRecordList(breakRolesRecordDto: BreakRolesRecordDto, pageVo: PageVo): Result<MutableMap<String, Any?>>? {

        return iHiddenDangerRecordService.getHiddenDangerRecordList(breakRolesRecordDto, pageVo)
    }

    override fun getHiddenDangerRecordDetail(id: String?): Result<HiddenDangerRecordDetailVo>? {

        return iHiddenDangerRecordService.getHiddenDangerRecordDetail(id)
    }

    override fun getMyHiddenDangerRecord(pageVo: PageVo): Result<MutableMap<String, Any?>>? {

        return iHiddenDangerRecordService.getMyHiddenDangerRecord(pageVo)
    }
}